import React from 'react'
import style from './index.module.scss'
import { connect } from 'react-redux'

class Index extends React.Component {
    render() {
        return(
            <div className={style.alertBox}>
                <div className={style.alert}>
                    <button onClick={() => this.props.setAlertShow()}>关闭</button>
                </div>
            </div>
        )
    }
}

const a = (store) => {
    return {}
}
const b = (dispatch) => {
    return {
        setAlertShow() {
            dispatch({
                type: 'SET_ALERTSHOW'
            })
        }
    }
}
export default connect(a, b)(Index)